<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!-- header -->
	<jsp:include page="../include/header.jsp"></jsp:include>
	<header id="header">	
	<!--header-->
	<jsp:include page="../include/header_top.jsp"></jsp:include>	
	<!--/header_top-->	
	<!--/header-middle-->
	<jsp:include page="../include/header_middle.jsp"></jsp:include>		
	<!--header-bottom-->
	<jsp:include page="../include/header_bottom.jsp"></jsp:include>	
	<!--/header-bottom-->	
<!--/header-->
<!--slider-->	
	<jsp:include page="../include/slider.jsp"></jsp:include>		
<!--/slider-->

		<script type="text/javascript">
			
		$(function() {
			var memberNo = '';
			if (location.search) {
				memberNo = location.search.split('?')[1];
				memberNo = memberNo.split('=')[1];
			} else {
				alert('존재하지 않는 회원입니다.');
			}
				
				
				
			/* get_cartJSON 키값

				cart_no
				cart_member
				cart_product
				cart_count
			*/
				
			var output = '';
				
			$.getJSON('getcartJSON', {memberNo:memberNo},//getcartJSON 으로 넘길 {키값:전달인자}
					function(cartList) { //CallBack함수로써, 응답데이터가 배열인자로 넘어온다

						output += '<table>';

						$.each(cartList, function (index, cartBeans){
							output += '<tr>';
							output += '<td>'+cartBeans.cart_no+'</td>';
							output += '<td>'+cartBeans.cart_member+'</td>';
							output += '<td>'+cartBeans.cart_product+'</td>';
							output += '<td>'+cartBeans.cart_count+'</td>';
							output += '</tr>';
						});
							
						output += '</table>';
							
						document.body.innerHTML += output;
					}						
			);
				
		});

		</script>






<!--Footer-->
	<jsp:include page="../include/footer.jsp"></jsp:include>
<!--/Footer-->
	